package com.zhsq.zlc.service.supplier;

import com.zhsq.zlc.dao.supplier.SupplierMapper;
import com.zhsq.zlc.entity.SupplierEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
public class SupplierServiceImpl implements SupplierService {

    @Autowired
    private SupplierMapper supplierMapper;
    @Override
    @Transactional
    public int count(SupplierEntity entity) {

        return supplierMapper.count(entity);
    }

    @Override
    @Transactional
    public List<SupplierEntity> list(SupplierEntity entity) {
        return supplierMapper.list(entity);
    }

    @Override
    public SupplierEntity getSupplierById(SupplierEntity entity) {
        return supplierMapper.getSupplierById(entity);
    }

    @Override
    @Transactional
    public void edit(SupplierEntity entity) {
        supplierMapper.edit(entity);
    }

    @Override
    @Transactional
    public void add(SupplierEntity entity) {
        supplierMapper.add(entity);
    }

    @Override
    @Transactional
    public void delete(int intID) {
        supplierMapper.delete(intID);
    }


}
